package day07_collections_map.com.itheima.d6_map_impl;

import java.util.TreeMap;

public class MapTest3 {
    public static void main(String[] args) {
        TreeMap<Movie, String> map = new TreeMap<>((o1, o2) -> Double.compare(o2.getScore(), o1.getScore()));
        map.put(new Movie("《唐顿庄园》", 9.5, "张艺谋"), "张艺谋");
        map.put(new Movie("三傻宝莱坞", 8.5, "阿米尔汗2"), "20:50");
        map.put(new Movie("三傻宝莱坞", 8.5, "阿米尔汗2"), "21:50");
        map.put(new Movie("阿甘正传", 7.5, "汤姆汉克斯"), "21:00");
        System.out.println("map = " + map);
    }
}
